package org.chengyi.model_shop.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.chengyi.model_shop.entity.User;

@Mapper
public interface PersonMapper {
    @Select("SELECT * FROM user WHERE id= #{userId}")
    User getById(Integer userId);

    @Update("UPDATE user SET username=#{username},email=#{email},phone=#{phone},address=#{address} WHERE id=#{id}")
    int update(User user);
}